/* Copyright (c) [2025] [zhi1208@126.com]
 * SPDX-License-Identifier: MIT
 */

#pragma once

/*********************
 *      INCLUDES
 *********************/
#include "bsp_log.h"

/*********************
 *      DEFINES
 *********************/
extern const struct fal_flash_dev stm32f2_onchip_flash;

#define FAL_PART_HAS_TABLE_CFG
#define FDB_WRITE_GRAN 8
#define FDB_PRINT(...) bsp_log(__VA_ARGS__)

#define FAL_FLASH_DEV_TABLE    \
    {                          \
        &stm32f2_onchip_flash, \
    }

#ifdef FAL_PART_HAS_TABLE_CFG
#define FAL_PART_TABLE                                                          \
    {                                                                           \
        {FAL_PART_MAGIC_WORD, "kvdb1", "stm32_onchip", 0xc0000, 256 * 1024, 0}, \
    }
#endif

/**********************
 *      TYPEDEFS
 **********************/

/**********************
 * GLOBAL PROTOTYPES
 **********************/

/**********************
 *      MACROS
 **********************/
